package com.atguigu.algorithm;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class MushRoom {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNextLine()){
            int N=scanner.nextInt();
            int M=scanner.nextInt();
            int K=scanner.nextInt();
            int[][] map=new int[N+1][M+1]; //原来表
            int[][] bomb=new int[N+1][M+1]; //映射炸弹位置的表
            while(K>0){
                map[scanner.nextInt()][scanner.nextInt()]=1;
                K--;
            }
            int total=findTotal(map,1,1,N,M);
            int avoid=avoidBomb(map,1,1,N,M);
            int rest=total-avoid;
            double value=1.0*rest/total;
            BigDecimal bd=new BigDecimal(value);
            bd=bd.setScale(2, RoundingMode.HALF_UP);
            System.out.println(bd);
        }
    }
    public static int findTotal(int[][] map,int x,int y,int col,int row){
        if(x<1 || y<1 || x>col || y>row){
            return 0;
        }
        if(x==col && y==row){
            return 1;
        }else{
            return findTotal(map,x+1,y,col,row)+findTotal(map,x,y+1,col,row);
        }
    }
    public static int avoidBomb(int[][] map,int x,int y,int col,int row){
        if(x<1 || y<1 || x>col || y>row){
            return 0;
        }
        if(map[x][y]==1){
            return 0;
        }
        if(x==col && y==row){
            return 1;
        }else{
            return avoidBomb(map,x+1,y,col,row)+avoidBomb(map,x,y+1,col,row);
        }
    }
}
